<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>考试历史</title>
    <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
    <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
    <meta name="author" content="yinqi">
    <link href="${base}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${base}/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="${base}/css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="container-fluid">

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-toolbar clearfix">
                    <form action="${base}/exam/toAfterHistoryBack" id="form1" method="post">
                        <input id="sj" type="text" class="btn btn-success m-r-5" value="${name}" name="name"  placeholder="试卷名搜索" onblur="sjm()">
                        <input type="text" class="btn btn-success m-r-5" style="width: 100px !important;background-color: #00e7af !important;" name="corel"   value="${corel}" onblur="cjl()">
                        <input type="text" class="btn btn-success m-r-5" style="width: 100px !important;background-color: #00e7af !important;" name="corer"  value="${corer}" onblur="cjr()">
                        <input id="km" type="text" class="btn btn-success m-r-5" name="subject" value="${subject}"  placeholder="科目名搜索" onblur="kmm()">
                    </form>
                </div>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th>试卷id</th>
                            <th>试卷名</th>
                            <th>科目</th>
                            <th>考试时长</th>
                            <th>开考时间</th>
                            <th>试卷总分</th>
                            <th>考试成绩</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="e" items="${examback.list}">
                            <tr>
                                <td>${e.id}</td>
                                <td>${e.name}</td>
                                <td>${e.subject}</td>
                                <td>${e.timelength}</td>
                                <td><fmt:formatDate value="${e.begintime}"  pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                                <td>${e.allscore}</td>
                                <td>${e.sumScore}</td>
                                <td>
                                    <div class="btn-group">
                                        <a class="btn btn-xs btn-default" href="${base}/exam/toshowExamInfoBack?userid=${theUser.id}&examid=${e.id}" title="查看" data-toggle="tooltip"><i class="mdi mdi-eye"></i></a>
                                        <a class="btn btn-xs btn-default" href="${base}/exam/toDeleteHistory?id=${e.id}" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                                        <a class="btn btn-xs btn-default" href="${base}/exam/downLoadExam?userid=${theUser.id}&examid=${e.id}" title="下载" data-toggle="tooltip"><i class="mdi mdi-debug-step-into"></i></a>
                                    </div>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <ul class="pagination">
                    <li><span><a href="${base}/exam/toAfterHistoryBack?pageNum=1&name=${name}&corel=${corel}&corer=${corer}&subject=${subject}">«</a></span></li>
                    <li><span><a href="${base}/exam/toAfterHistoryBack?pageNum=${examback.prePage}&name=${name}&corel=${corel}&corer=${corer}&subject=${subject}">上一页</a></span></li>
                    <c:forEach var="i" items="${examback.navigatepageNums}">
                        <li <c:if test="${i eq examback.pageNum}">class="active"</c:if> ><a href="${base}/exam/toAfterHistoryBack?pageNum=${i}&name=${name}&corel=${corel}&corer=${corer}&subject=${subject}">${i}</a></li>
                    </c:forEach>
                    <li><span><a href="${base}/exam/toAfterHistoryBack?pageNum=${examback.nextPage}&name=${name}&corel=${corel}&corer=${corer}&subject=${subject}">下一页</a></span></li>
                    <li><span><a href="${base}/exam/toAfterHistoryBack?pageNum=${examback.pages}&name=${name}&corel=${corel}&corer=${corer}&subject=${subject}">»</a></span></li>
                </ul>

            </div>
        </div>
    </div>

</div>

</div>

<script type="text/javascript" src="${base}/js/jquery.min.js"></script>
<script type="text/javascript" src="${base}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${base}/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="${base}/js/main.min.js"></script>
<script type="text/javascript">
    $(function(){
        $('.search-bar .dropdown-menu a').click(function() {
            var field = $(this).data('field') || '';
            $('#search-field').val(field);
            $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
        });
    });
    function sjm() {
        $("#form1").submit();
    }
    function kmm() {
        $("#form1").submit();
    }
    function cjl() {
        $("#form1").submit();
    }
    function cjr() {
        $("#form1").submit();
    }
</script>
</body>
</html>
